#ifndef DBSTORAGE_CREATE_ROOT_REQUIREMENT_STORAGE_CMD_HPP
#define DBSTORAGE_CREATE_ROOT_REQUIREMENT_STORAGE_CMD_HPP

#include "DbStorage/DbStorageCmd.hpp"

namespace Model { class Requirement; }

namespace DbStorage
{

/// @ingroup DbStorage
/// @brief It implements the command for storing the specified root requirement in database.
class CreateRootRequirementStorageCmd: public DbStorageCmd
{
public:
	/// @brief It initializes the command.
	/// @param subject the requirement to be stored.
	/// @param dbConnection the database connection to be used for storage.
	/// @pre The requirement to be stored should be a root requirement.
	CreateRootRequirementStorageCmd( Model::Requirement& subject, CaseDB::Connection& dbConnection);

	/// @brief It inserts the root requirement in the database.
	///
	/// The insertion generates a primary key which will be set to the stored requirement object as the stored 
	///	identifier.
	virtual void execute();
};


} // namespace DbStorage

#endif // DBSTORAGE_CREATE_ROOT_REQUIREMENT_STORAGE_CMD_HPP